home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / ftn / texdef.z / texdef
Encoding:
Text File  |  2002-10-03  |  39.0 KB  |  727 lines

  1.  
  2.  
  3.  
  4. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      tttteeeexxxxddddeeeeffff2222dddd - convert a 2-dimensional image into a texture
  10.      tttteeeexxxxddddeeeeffff3333dddd - convert a 3-dimensional image into a texture
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee tttteeeexxxxddddffff2222((((iiiinnnnddddeeeexxxx,,,, nnnncccc,,,, wwwwiiiiddddtttthhhh,,,, hhhheeeeiiiigggghhhhtttt,,,, ddddeeeepppptttthhhh,,,, iiiimmmmaaaaggggeeee,,,, nnnnpppp,,,, pppprrrrooooppppssss))))
  14.      iiiinnnntttteeeeggggeeeerrrr****4444 iiiinnnnddddeeeexxxx,,,, nnnncccc,,,, wwwwiiiiddddtttthhhh,,,, hhhheeeeiiiigggghhhhtttt
  15.      iiiinnnntttteeeeggggeeeerrrr****4444 iiiimmmmaaaaggggeeee((((****))))
  16.      iiiinnnntttteeeeggggeeeerrrr****4444 nnnnpppp
  17.      rrrreeeeaaaallll pppprrrrooooppppssss((((nnnnpppp))))
  18.  
  19.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee tttteeeexxxxddddffff3333((((iiiinnnnddddeeeexxxx,,,, nnnncccc,,,, wwwwiiiiddddtttthhhh,,,, hhhheeeeiiiigggghhhhtttt,,,, ddddeeeepppptttthhhh,,,, iiiimmmmaaaaggggeeee,,,, nnnnpppp,,,, pppprrrrooooppppssss))))
  20.      iiiinnnntttteeeeggggeeeerrrr****4444 iiiinnnnddddeeeexxxx,,,, nnnncccc,,,, wwwwiiiiddddtttthhhh,,,, hhhheeeeiiiigggghhhhtttt,,,, ddddeeeepppptttthhhh
  21.      iiiinnnntttteeeeggggeeeerrrr****4444 iiiimmmmaaaaggggeeee((((****))))
  22.      iiiinnnntttteeeeggggeeeerrrr****4444 nnnnpppp
  23.      rrrreeeeaaaallll pppprrrrooooppppssss((((nnnnpppp))))
  24.  
  25. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  26.      _i_n_d_e_x    expects the name of the texture function being defined.  Index 0
  27.               is reserved as a null definition, and cannot be redefined.
  28.  
  29.      _n_c       expects the number of components per _i_m_a_g_e pixel.  1, 2, 3, and
  30.               4 component textures and 8-bit and 16-bit components are
  31.               supported.
  32.  
  33.      _w_i_d_t_h    expects the width of _i_m_a_g_e in pixels.
  34.  
  35.      _h_e_i_g_h_t   expects the height of _i_m_a_g_e in pixels.
  36.  
  37.      _d_e_p_t_h    expects the depth of _i_m_a_g_e in pixels.  (texdf3 only).
  38.  
  39.      _i_m_a_g_e    expects a long-word-aligned array containing the pixel data.
  40.               This texture image is loaded from left to right, bottom to top,
  41.               and back to front. The pixels are packed, but each row must
  42.               begin on a long word boundary. The end of each row must be
  43.               byte-padded if necessary.  The Graphics Library Programmer's
  44.               Guide shows how to load a texture array.
  45.  
  46.      _n_p       expects the number of symbols and floating point values in
  47.               _p_r_o_p_s, including the termination symbol TXNULL.  If _n_p is zero,
  48.               it is ignored.  Operation over network connections is more
  49.               efficient when _n_p is correctly specified.
  50.  
  51.      _p_r_o_p_s    expects the array of floating point symbols and values that
  52.               control definition of the texture function.  _p_r_o_p_s must contain
  53.               a sequence of symbols, each followed by the appropriate number
  54.               of floating point values.  The last symbol must be TXNULL.
  55.  
  56. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  57.      Texture coordinates, _s,_t,_r,_q may be specified at geometry vertices,
  58.      similarly to color, depth, and vertex normals.  The texture coordinates
  59.      are interpolated from the values specified at the vertices for each
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      screen pixel touched by the geometry.  A texture function maps the
  75.      texture coordinates _s,_t, or _s,_t,_r, corresponding to a screen pixel into
  76.      _n_c values, called texture function outputs, using an _i_m_a_g_e and a set of
  77.      properties. The texture function outputs may be translated into an equal
  78.      or greater number of texture function outputs with a texture look-up
  79.      table.  The texture function outputs are used by the texture environment
  80.      function to modify the screen pixel color.
  81.  
  82.      tttteeeexxxxddddeeeeffff and tttteeeexxxxdddd3333dddd define such a texture function and associate it with
  83.      _i_n_d_e_x.  tttteeeexxxxbbbbiiiinnnndddd selects which texture function definition to use.  The
  84.      texture environment function is defined by tttteeeevvvvddddeeeeffff and selected by
  85.      tttteeeevvvvbbbbiiiinnnndddd. The texture lookup table is defined by ttttlllluuuuttttddddeeeeffff and selected by
  86.      ttttlllluuuuttttbbbbiiiinnnndddd. The texture coordinates are specified with the tttt family of
  87.      commands.
  88.  
  89.      Multiple image pixels may correspond to one screen pixel, and vice versa.
  90.      Sophisticated sample-filtering may be needed to generate texture function
  91.      outputs free of distracting visual artifacts. The filters may be
  92.      specified with the _p_r_o_p_s array.
  93.  
  94.      Regardless of the size of the image, it is mapped into _s,_t,_r-coordinates
  95.      such that its lower-left-back corner is (0,0,0), and its upper-right-
  96.      front corner is (1,1,1).  The way that _s,_t,_r map onto the image when they
  97.      are out of the range 0.0 through 1.0 is specified in the _p_r_o_p_s array.
  98.  
  99.      A useful texture function can be defined by simply passing an image and a
  100.      null _p_r_o_p_s array to tttteeeexxxxddddffff2222 and tttteeeexxxxddddffff3333.  The options specified in the
  101.      _p_r_o_p_s array, however, give control over both texture mapping quality and
  102.      performance.  The following symbols are accepted in _p_r_o_p_s:
  103.  
  104.           TTTTXXXXFFFFSSSSDDDDFFFF specifies that the GL should not copy the passed texture
  105.           array to another buffer before loading the texture to texture
  106.           memory. This token is a synonym for the experimental tokens
  107.           TX_NOCOPY and TX_SUBTEXLOAD, and when used with fbsubtexload,
  108.           replaces the experimental TX_FRAMEBUFFER_SRC token. The TX_NOCOPY,
  109.           TX_SUBTEXLOAD and TX_FRAMEBUFFER_SRC tokens are obsolete.
  110.  
  111.           The advantages of using this token are that 1) texture definition
  112.           time is greatly reduced, sometimes by a factor of 10,000, and it
  113.           allows the use of subtexload and fbsubtexload to load new texture
  114.           data while the texture is bound. This allows dynamic textures. 2)
  115.           CPU memory use is also reduced since the user's array is used to
  116.           load texture memory directly, the GL does not need to copy the array
  117.           to a separate buffer for texture memory loading purposes.  3) The
  118.           TX_EXTERNAL_FORMAT, TX_PIXMODE token pair can be used to allow
  119.           automatic data conversions and scale and bias on the input texture
  120.           array when it is loaded to texture memory.
  121.  
  122.           The disadvantages are that 1) the cost of a texbind in the case that
  123.           texture that was not resident in texture memory and thus had to be
  124.           loaded is slightly greater, 2) No minification or magnification
  125.           filter which requires the generation of a MIPmap may be used. 3) The
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  137.  
  138.  
  139.  
  140.           token can only be used with textures that are size 2^M x 2^N where
  141.           M,N are integers.  4) The token is ignored by texdef3d.
  142.  
  143.           The passed array should not be overwritten or freed while the
  144.           texture is active because the array may be needed to reload texture
  145.           memory if the texture memory is invalidated by the need to load
  146.           other textures.
  147.  
  148.           The user may also pass a null array, and later fill all or part of
  149.           the texture memory allocated for the texture with the subtexload or
  150.           fbsubtexload commands.
  151.  
  152.           TTTTXXXXMMMMIIIINNNNFFFF specifies the sample-filtering function used to generate the
  153.           texture function output when multiple image pixels correspond to one
  154.           pixel on the screen.  This token is followed by a single symbol that
  155.           specifies which minification filter to use. For many Graphics
  156.           Library implementations, texturing performance is constrained by the
  157.           number of samples used by the filter per texture function output.
  158.           The classical 2D MIPmap filter needs to access eight image pixels
  159.           for each screen pixel.  Performance and quality may be traded by
  160.           limiting the number of samples used, and the computations necessary
  161.           to find the samples.
  162.  
  163.  
  164.             TTTTXXXXPPPPOOOOIIIINNNN selects the value of the image pixel nearest to the _s,_t,_r
  165.             mapping onto the texture. (2d or 3d)
  166.             TTTTXXXXBBBBIIIILLLLIIII selects the weighted average of the values of the four
  167.             image pixels nearest to the _s,_t mapping onto the texture. (2d
  168.             only)
  169.             TTTTXXXXBBBBLLLLLLLLEEEE ((((oooorrrr TTTTXXXXBBBBLLLLGGGGEEEE)))) selects the four image pixels nearest to the
  170.             _s,_t mapping onto the texture.  The value of the _r texture
  171.             coordinate is compared with each image pixel.  If _r is less than
  172.             (or greater than) the image pixel, the result is maximum image
  173.             pixel value.  Otherwise it is 0.  The four comparison results are
  174.             bilinear blended.  This feature is useful for real-time shadow
  175.             computations.  (2d only)
  176.             TTTTXXXXTTTTRRRRIIIILLLL selects the weighted average of the values of the eight
  177.             image pixels nearest to the _s,_t,_r mapping onto the texture. (3d
  178.             only)
  179.             TTTTXXXXBBBBIIIICCCCUUUU uses a smooth weighting of a 4x4 region of image pixels
  180.             nearest to the _s,_t mapping onto the texture. (2d only)
  181.             TTTTXXXXMMMMMMMMPPPP chooses a prefiltered version of the image, based on the
  182.             number of image pixels that correspond to one screen pixel, then
  183.             selects the value of the pixel that is nearest to the _s,_t,_r
  184.             mapping onto that image. (2d or 3d)
  185.             TTTTXXXXMMMMMMMMLLLL chooses the two prefiltered versions of the image that have
  186.             the nearest image pixel to screen pixel size correspondence, then
  187.             selects the weighted average of the values of the pixel in each of
  188.             these images that is nearest the _s,_t,_r mapping onto that image.
  189.             (2d or 3d)
  190.             TTTTXXXXMMMMMMMMBBBBLLLL chooses a prefiltered version of the image, based on the
  191.             number of image pixels that correspond to one screen pixel, then
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  203.  
  204.  
  205.  
  206.             selects the weighted average of the values of the four pixels
  207.             nearest to the _s,_t mapping onto that image. (2d only)
  208.             TTTTXXXXMMMMMMMMTTTTLLLL chooses the two prefiltered versions of the image that have
  209.             the nearest image pixel to screen pixel size correspondence, then
  210.             selects the weighted average of the values of the four pixels in
  211.             each of these images that is nearest the _s,_t mapping onto that
  212.             image. The weighted averages from the two levels are then
  213.             themselves interpolated. (2d only)
  214.             TTTTXXXXMMMMMMMMQQQQLLLL chooses the two prefiltered versions of the image that have
  215.             the nearest image pixel to screen pixel size correspondence, then
  216.             selects the weighted average of the values of the eight pixels in
  217.             each of these images that is nearest the _s,_t,_r mapping onto that
  218.             image. The weighted averages from the two levels are then
  219.             themselves interpolated. (3d only)
  220.  
  221.           The default minification filter is TXMML or a filter of equal
  222.           performance, but better quality.  Prefiltered versions of the image,
  223.           when required by the minification filter, are computed automatically
  224.           by the Graphics Library. The TXMIPM token, described below,
  225.           specifies the 8x8 (2D) or 8x8x8 (3D) filter kernel used by the
  226.           Graphics Library to generate MIPmap levels.
  227.  
  228.           TTTTXXXXMMMMAAAAGGGGFFFF or TTTTXXXXMMMMAAAAFFFFAAAA or TTTTXXXXMMMMAAAAFFFFCCCC specifies the filter function used to
  229.           generate the texture function output when multiple screen pixels
  230.           correspond to one image pixel.  It is followed by a single symbol
  231.           that specifies which magnification filter to use.  The sample-
  232.           filtering function can be specified seperately for alpha and non-
  233.           alpha texture function outputs with TXMAFA and TXMAFC.  One possible
  234.           use of this seperation of alpha and color magnification filters is
  235.           for the case where non-zero alpha defines a geometry-approximating
  236.           template such as a tree outline. The following token sequence
  237.           TX_MAFA, TXSHAR, TXMAFC, TXBILI, can be used to keep the outline of
  238.           the tree sharp without any color-shift side effects of the
  239.           sharpening magnification filter.  The magnification filter symbols
  240.           are:
  241.  
  242.  
  243.             TTTTXXXXPPPPOOOOIIIINNNN selects the value of the image pixel nearest to the _s,_t,_r
  244.             mapping onto the texture. (2d or 3d)
  245.             TTTTXXXXBBBBIIIILLLLIIII selects the weighted average of the values of the four
  246.             image pixels nearest to the _s,_t mapping onto the texture. (2d
  247.             only)
  248.             TTTTXXXXBBBBLLLLLLLLEEEE ((((oooorrrr TTTTXXXXBBBBLLLLGGGGEEEE)))) must be used in conjunction with the same
  249.             TTTTXXXXMMMMIIIINNNNFFFF.  (see TTTTXXXXMMMMIIIINNNNFFFF above)
  250.             TTTTXXXXTTTTRRRRIIIILLLL selects the weighted average of the values of the eight
  251.             image pixels nearest to the _s,_t,_r mapping onto the texture. (3d
  252.             only)
  253.             TTTTXXXXBBBBIIIICCCCUUUU computes a smooth weighted average of a 4x4 region of image
  254.             pixels nearest to the _s,_t mapping onto the texture. (2d only)
  255.             TTTTXXXXSSSSHHHHAAAARRRR attempts to magnify the image without blurring. It may only
  256.             be used with mipmapped textures.  It computes the weighted average
  257.             of the values of the four pixels that are nearest the _s,_t mapping
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  269.  
  270.  
  271.  
  272.             onto that image for each of the top two levels of a MIPmap. The
  273.             two values are then extrapolated rather than interpolated to get a
  274.             final texel value.  A formulaic description is
  275.  
  276.             final_texture_function =
  277.             (1 + sharpen_scale(LOD)) * bilinearly_interpolated_image_level_0  -
  278.             (    sharpen_scale(LOD)) * bilinearly_interpolated_image_level_1
  279.  
  280.             where LOD, or Level Of Detail, is a logarithmic function of the
  281.             ratio of screen pixel scale to image pixel scale.  LOD is 0 when
  282.             screen pixel scale equals image pixel scale, positive when screen
  283.             pixels are larger, and negative when screen pixels are smaller.
  284.             For magnification filters, LOD is negative.  The sharpen_scale
  285.             function is a positive valued function that may be specified with
  286.             the TXCPNT token, described below.  Because color components may
  287.             be pushed out of range, color shift may be evident at large
  288.             magnifications.
  289.             TTTTXXXXAAAADDDDDDDDDDDD may also be used to magnify the image while maintaining
  290.             fine detail. However, instead of using a filtered down version of
  291.             the image and the image, as with TX_SHARPEN, an explicitly
  292.             specified TX_DETAIL image is used. The TX_DETAIL image is added to
  293.             the image, scaled as a function of LOD at a rate that can be
  294.             specified by the user. A formulaic description of the operation is
  295.  
  296.             final_texture_function =
  297.             bilinearly_interpolated_image  +
  298.             (bilin_interpolated_detail_image - max_pixel_val*0.5) *
  299.              detail_scale(LOD)
  300.  
  301.             The detail_scale(LOD) function is a positive valued function of
  302.             LOD.  The TX_CONTROL_POINT token, described below, can be used to
  303.             control the detail_scale(LOD) function.
  304.             TTTTXXXXMMMMOOOODDDDUUUU is similar to TX_ADD_DETAIL, but modulates the image with
  305.             an explicitly specified detail image, rather than adding the
  306.             detail image.  A formulaic description of the operation is
  307.  
  308.             final_texture_function =
  309.             bilinearly_interpolated_image  +
  310.             (bilin_interpolated_detail_image - max_pixel_val*0.5) *
  311.              bilin_interpolated_image * detail_scale(LOD)
  312.  
  313.             The TX_CONTROL_POINT token, described below, can be used to
  314.             control the additive detail magnification function.
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  335.  
  336.  
  337.  
  338.           The default magnification filter is TTTTXXXXBBBBIIIILLLLIIII for texdef2d and TTTTXXXXTTTTRRRRIIIILLLL
  339.           for texdef3d.
  340.  
  341.           TTTTXXXXWWWWRRRRAAAAPPPP specifies how texture coordinates outside the range 0.0
  342.           through 1.0 are handled.
  343.  
  344.  
  345.             TTTTXXXXRRRREEEEPPPPEEEE uses the fractional parts of the texture coordinates.
  346.             TTTTXXXXCCCCLLLLAAAAMMMM clamps the texture coordinates to the range 0.0 through
  347.             1.0.
  348.             TTTTXXXXSSSSEEEELLLLEEEE does not render pixels which fall outside the 0.0 to 1.0
  349.             texture coordinate range.
  350.  
  351.           The default texture coordinate handling is TTTTXXXX____RRRREEEEPPPPEEEE....
  352.  
  353.           TTTTXXXXWWWWRRRRPPPPSSSS is like TXWRAP, but it specifies behavior only for the _s
  354.           texture coordinate.
  355.  
  356.           TTTTXXXXWWWWRRRRPPPPTTTT is like TXWRAP, but it specifies behavior only for the _t
  357.           texture coordinate.
  358.  
  359.           TTTTXXXXWWWWRRRRPPPPRRRR is like TXWRAP, but it specifies behavior only for the _r
  360.           texture coordinate.
  361.  
  362.           TTTTXXXXIIIINNNNTTTTEEEE is a hint used to trade image quality for speed. It affects
  363.           the precision used internally in  texture function computations in
  364.           the Graphics Library. Because the performance of texture function
  365.           implementations is typically constrained by image pixel accesses per
  366.           screen pixel, the user can specify a smaller internal image pixel
  367.           size and often realize performance gain. Most Graphics Library
  368.           implementations will default to the smallest image pixel size that
  369.           still yields a performance increase.  When the external format is
  370.           larger than the internal format, the most significant bits of the
  371.           external format pixel are used. When the external format is smaller
  372.           than the internal format, the most significant bits of the external
  373.           format pixel are replicated in the lower order bits of the internal
  374.           format. Thus, three 8-bit external format components with the
  375.           hexadecimal values AB,FF,00 become the three 12-bit internal format
  376.           components with the hexadecimal values ABA,FFF,000. It is an error
  377.           to specify an internal format with a different number of components
  378.           than in the external format. For example, an ABGR external texel
  379.           should not be mapped to a TX_RGB_5 interal texel. There are two
  380.           exceptions.  One component textures may be used with TX_I_12A_4 and
  381.           TX_IA_8 internal formats. For completeness, TX_I_12 and TX_I_8 are
  382.           defined as synonyms. Three component textures may be used with
  383.           TX_RGBA_8 internal formats. For completeness, TX_RGB_8 is defined as
  384.           a synonym for TX_RGBA_8.
  385.  
  386.  
  387.             TTTTXXXX11112222AAAA4444 specifies that a one or two component texture should be
  388.             computed with at least 12 bits for intensity and 4 bits for alpha.
  389.             Image pixel size: 16 bits.
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  401.  
  402.  
  403.  
  404.             TTTTXXXXIIIIAAAA8888 specifies that a two component texture should be computed
  405.             with at least 8 bits for intensity and 8 bits for alpha. Image
  406.             pixel size: 16 bits.
  407.             TTTTXXXXRRRRGGGGBBBB5555 specifies that a 3 component texture should be computed
  408.             with at least 5 bits for red and blue and at least 6 bits for
  409.             green. Image pixel size: 16 bits.
  410.             TTTTXXXXRRRRGGGGBBBBAAAA specifies that a 4 component texture should be computed
  411.             with at least 4 bits per component. Image pixel size: 16 bits.
  412.             TTTTXXXXIIIIAAAA11112222 specifies that a 2 component texture should be computed
  413.             with at least 12 bits per component. Image pixel size: 24 bits;
  414.             may be rounded up to 32 bits.
  415.             RRRRGGGGBBBBAAAA8888 specifies that a 3 or 4 component texture should be computed
  416.             with at least 8 bits per component. Image pixel size: 32 bits.
  417.             RRRRGGGGBBBBAAAA11112222 specifies that a 4 component texture should be computed
  418.             with at least 12 bits per component. Image pixel size: 64 bits.
  419.             TTTTXXXXRRRRGGGGBBBB1111 specifies that a 3 component texture should be computed
  420.             with at least 12 bits per component. Image pixel size: 64 bits.
  421.             TTTTXXXXIIII11116666 specifies that a 1 component texture is used as a shadow map
  422.             for real-time shadow computations. Image pixel size: 16 bits.
  423.  
  424.           TTTTXXXXEEEEXXXXTTTTEEEE tells the Graphic Library what size components are being used
  425.           in _i_m_a_g_e.
  426.  
  427.  
  428.             TTTTXXXXPPPPKKKK00008888 specifies that _i_m_a_g_e is composed of 8-bit components. This
  429.             is the default.
  430.             TTTTXXXXPPPPKKKK11116666 specifies that _i_m_a_g_e is composed of 16-bit components.
  431.             TTTTXXXXPPPPXXXXMMMMDDDD specifies that the input pixel format and type
  432.             specifications and scale and bias values specified with pixmode
  433.             should be applied to the texture when it is loaded. This can only
  434.             be used with textures defined with the TX_FAST_DEFINE token.
  435.  
  436.           TTTTXXXXMMMMIIIIPPPPMMMM specifies an 8x8x8 kernel to use as a separable symmetric
  437.           filter to generate MIPmap levels. Since it is separable and
  438.           symmetric, only one dimension needs to be specified. The eight
  439.           floating point values that follow the token specify the token. The
  440.           default used for some implementations which do not correct for
  441.           perspective distortion is
  442.           0.0, 0.0, 0.125, 0.375, 0.375, 0.125, 0.0, 0.0.
  443.           The default used for implementations which correct for perspective
  444.           distortion is
  445.           0.0, -0.03125, 0.05, 0.48125, 0.48125, 0.05, -0.03125, 0.0.
  446.           This filter blurs less.
  447.  
  448.           TTTTXXXXCCCCPPPPNNNNTTTT is followed by a pair of floating point values, LOD and
  449.           scale.
  450.           TTTTXXXXCCCCCCCCLLLLPPPP is followed by one value.  The pairs of lod and scale values
  451.           specify the rate at which the TX_SHARPEN or TX_ADD_DETAIL or
  452.           TX_MODULATE_DETAIL magnification filter is applied, as a function of
  453.           LOD.  If no control points are specified, the default control points
  454.           are (0.,0.), (3.,3.), (4.,4.), (6.5, 6.5). If any control points are
  455.           specified, the default control points are not used. Only the first 4
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  467.  
  468.  
  469.  
  470.           control points will have any effect.  The TX_CONTROL_CLAMP token
  471.           clamps the scale at a maximum value. Its default is 6.5.
  472.  
  473.           TTTTXXXXDDDDEEEETTTTAAAA is followed by five values, J, K, M, N, and scramble. To be
  474.           used as a detail texture, that is, bound to the TX_TEXTURE_DETAIL
  475.           target rather than the familiar TX_TEXTURE_0 target, and used with a
  476.           texture that has TX_ADD_DETAIL or TX_MODULATE_DETAIL as a
  477.           magnification filter, this token must appear.  A detail texture is
  478.           interpreted as a J x K collection of detail subimages which modulate
  479.           or add to a M x N block of texture pixels. When a texture is used as
  480.           a detail texture, the properties MINFILTER, MAGFILTER,
  481.           MAGFILTER_COLOR, MAGFILTER_ALPHA, TX_WRAP, TX_WRAP_S, TX_WRAP_T,
  482.           TX_WRAP_R, TX_MIPMAP_FILTER_KERNEL, TX_CONTROL_POINT,
  483.           TX_CONTROL_CLAMP, and TX_TILE have no effect.
  484.  
  485.           TTTTXXXXTTTTIIIILLLLEEEE specifies a subregion of an image to be turned into a
  486.           texture.  It is followed by four floating point coordinates that
  487.           specify the _x and _y coordinates of the lower-left corner of the
  488.           subregion, then the _x and _y coordinates of the upper-right corner of
  489.           the subregion.  The original texture image continues to be addressed
  490.           in the range 0,0 through 1,1.  However, the subregion occupies only
  491.           a fraction of this space, and pixels that map outside the subregion
  492.           are not drawn.
  493.  
  494.           If the image (or the specified subregion) is larger than can be
  495.           handled by the hardware, it is reduced to the maximum supported size
  496.           automatically (with no indication other than the resulting visual
  497.           quality).  Because subregions are specified independently, they
  498.           should all be the same size (otherwise some may be reduced and
  499.           others not).
  500.  
  501.           TXTILE supports mapping of high-resolution images with multiple
  502.           rendering passes.  By splitting the texture into multiple pieces,
  503.           each piece can be rendered at the maximum supported texture
  504.           resolution.  For example, to render a scene with 2x texture
  505.           resolution, tttteeeexxxxddddeeeeffff is called four times.  Each call includes the
  506.           entire image, but specifies a different subregion of that image to
  507.           be converted into a texture.  To divide the image both horizontally
  508.           and vertically into quadrants the subregions should be (0,0 .5,.5),
  509.           (.5,0 1,.5), (0,.5 .5,1), and (.5,.5 1,1).  The scene is then drawn
  510.           four times, each time calling tttteeeexxxxbbbbiiiinnnn with the texture id of one of
  511.           the four quadrants.  In each pass, only the pixels whose texture
  512.           coordinates map within that quadrant are drawn.  Pixels outside of
  513.           this quadrant are effectively clipped.
  514.  
  515.           TTTTXXXXBBBBCCCCFFFF is followed by two values, B and C, that specify the blurring
  516.           and ringing quality of the bicubic texture filter used for
  517.           TX_MINFILTER and/or TX_MAGFILTER.  The detailed usage of these
  518.           values is described in Don Mitchell's paper, ``Reconstruction
  519.           Filters in Computer Graphics'', on SIGGRAPH'88.  The same B and C
  520.           will be applied to both s and t.  If B and C are not specified when
  521.           bicubic texture mapping is performed (TX_BICUBIC is used for
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  533.  
  534.  
  535.  
  536.           TX_MINFILTER and/or TX_MAGFILTER), a default bicubic texture filter
  537.           will be used.
  538.  
  539. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  540.      afunct, scrsub, t, tevbin, tevdef, texbin, texgen, tltdef, tltbin
  541.  
  542. NNNNOOOOTTTTEEEESSSS
  543.      tttteeeexxxxddddeeeeffff is immediate mode only.  IRIS-4D G, GT, and GTX models, and the
  544.      Personal Iris, do not support texture mapping.  tttteeeexxxxddddeeeeffff is ignored by
  545.      these machines.  tttteeeexxxxdddd3333dddd only accepts images of size 2^j x 2^k x 2^l where
  546.      j,k,l are non-negative integers. Non-power of two images are not
  547.      accepted.  This is different than texdef2d, but consistent with OpenGL.
  548.      The Iris Indy, Indigo Entry, and XL support texture mapping except for
  549.      lines.  Use ggggeeeettttggggddddeeee to determine whether texture mapping is supported.
  550.  
  551.      TTTTXXXXMMMMMMMMTTTTLLLL is not supported on the VGX model.
  552.  
  553.      It is acceptable to define a 4-component texture function on an IRIS-4D
  554.      VGX, or VGXT, system that does not have alpha bitplanes.  However, this
  555.      definition will be treated as a 3-component definition by tttteeeevvvvddddeeeeffff.  Use
  556.      ggggeeeettttggggddddeeee((((GGGGDDDDBBBBNNNNSSSSAAAA)))) to determine whether alpha bitplanes are available.
  557.  
  558.      Points, lines, and characters, as well as polygons, are texture mapped.
  559.      Filter selection and wrap modes are applicable to lines.  Points are
  560.      filtered by the magnification filter, assuming a 1-to-1 correspondence
  561.      between texture pixel and screen pixel size.  Characters use the same
  562.      magnification filter, but are mapped assuming that both _s and _t are zero.
  563.  
  564.      IRIS screen pixels have integer coordinates at their centers.  Texture
  565.      images, however, have integer coordinates (0 and 1) at their exact edges,
  566.      not at the centers of pixels on their edges.
  567.  
  568.      On IRIS-4D VGXT models tiling large images will improve texture quality
  569.      only when the individual tiles measure no more than 1/4 the original
  570.      image size in either dimension.
  571.  
  572.      On IRIS-4D RealityEngine models the only MIPmap filter used is
  573.      TX_MIPMAP_TRILINEAR for 2D and TX_MIPMAP_QUADLINEAR for 3d. All the other
  574.      forms of MIPmap filters will default to these filters.
  575.  
  576.      The IRIS-4D G, GT, GTX, VGX, VGXT models, Personal Iris, Iris Indigo, and
  577.      Indy do not support tttteeeexxxxddddeeeeffff3333dddd, TXBICU, TXMAFC, TXMAFA, TXSHAR, TXADDD,
  578.      TXMODU, TXINTE, TXEXTE, TXMIPM, TXCPNT, TXCCLP, TXDETA, TXBLLE, TXBLGE,
  579.      or TXBCF.
  580.  
  581. BBBBUUUUGGGGSSSS
  582.      On IRIS-4D RealityEngine models:
  583.  
  584.           -  Discrepancies between the number of components in the external
  585.           format texel and the internal format texel are not detected.
  586.           Mismatched numbers of external and internal components will often
  587.           work anyway in the case of non- TX_FAST_DEFINE textures, but will
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  599.  
  600.  
  601.  
  602.           usually cause undesired results if TX_FAST_DEFINE is used.
  603.  
  604.           -  If a 1 component TX_FAST_DEFINE texture is used with a texture
  605.           look up table, (tlutdef,tlutbind), TX_INTERNAL_FORMAT, TX_IA_8
  606.           should be used rather than the default 1 component format TX_I_12A_4
  607.           to get the alpha lookup to perform correctly. The reason for this is
  608.           that the hardware considers the I_12A_4 format to be a two component
  609.           format and A is used to lookup A in the tlut, rather than using I to
  610.           lookup A. The top 4 bits of I can be copied to A in the GL to get
  611.           this to work correctly but this affects performance. Since the tlut
  612.           is only 8 bits in and not 12, we take the time to copy the I channel
  613.           to A for the IA_8 format when the user texture is one component, so
  614.           the tlut will function correctly.
  615.  
  616.           -  using TXDETA, requires J,K to be 4 and the detail image to be
  617.           256x256, forcing the subimage size to be 64x64. Allowable values of
  618.           M,N are {4,4} (the default), {8,8}, {16,16}, {32,32}, or {64,64}.
  619.           Scramble has no effect.
  620.  
  621.           -  If TXBICU is used for either TXMINF, or TXMAGF it will be used
  622.           for _b_o_t_h TX_MINFILTER and TX_MAGFILTER.  This filter must always be
  623.           used with an internal format that has at least 12 bits per
  624.           component.
  625.  
  626.           -  3D textures do not support TXTILE.
  627.  
  628.  
  629.  
  630.           -  3D textures do not support TXSELE.
  631.  
  632.           -  If TXMAFC and/or TXMAFA are used, one filter must be TX_MMTL and
  633.           the other must be TXSHAR, TXMODU or TXADDD.
  634.  
  635.           -  The TX_POINT filter may not produce the exact value of the
  636.           texture pixel sampled due to arithmetic approximations.
  637.  
  638.           -  The TXBILL, TXBILG minification and magnification filters and
  639.           TXI16 format texel are tied together in the implementation so that
  640.           they must be used together and in fact cannot be used with any other
  641.           minification and magnification filters and texel formats.
  642.           Similarly, the texture environment TVALPH (see tttteeeevvvvddddeeeeffff) can be used
  643.           only with TXI16.  This combination of features is used for a real-
  644.           time shadows effect.
  645.  
  646.      On IRIS-4D VGX, and VGXT when using TTTTXXXXTTTTIIIILLLLEEEE, _w_i_d_t_h and _h_e_i_g_h_t of both the
  647.      original image and the specified subregion must be a power of 2.
  648.  
  649.      On IRIS-4D VGX model when using TTTTXXXXTTTTIIIILLLLEEEE, texture coordinate _t is always
  650.      clamped to the range 0.0 through 1.0 regardless of the value of TTTTXXXXWWWWRRRRPPPPTTTT.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. tttteeeexxxxddddeeeeffff((((3333GGGG))))                                                          tttteeeexxxxddddeeeeffff((((3333GGGG))))
  665.  
  666.  
  667.  
  668.      On IRIS-4D VGX model when TTTTXXXXWWWWRRRRPPPPSSSS is set to TTTTXXXXCCCCLLLLAAAAMMMM, TTTTXXXXWWWWRRRRPPPPTTTT also be set to
  669.      TTTTXXXXCCCCLLLLAAAAMMMM.  Otherwise operation is undefined.
  670.  
  671.      On IRIS-4D VGXT models when using TTTTXXXXTTTTIIIILLLLEEEE, and TTTTXXXXWWWWRRRRPPPPTTTT, TTTTXXXXWWWWRRRRPPPPSSSS, or TTTTXXXXWWWWRRRRAAAAPPPP
  672.      are set to TTTTXXXXCCCCLLLLAAAAMMMM, the texture coordinates in the corresponding dimension
  673.      must be within the closed range [0,1].
  674.  
  675.      On IRIS-4D RealityEngine models TTTTXXXXTTTTIIIILLLLEEEE and TTTTXXXXSSSSEEEELLLLEEEE do not work together.
  676.  
  677.      In the Graphics Library Programmer's Guide (1992) pg. 18-30 eq. 18-1
  678.      should read:
  679.  
  680.  
  681.           M,N = 256/(2^(2+N))
  682.  
  683.      and the TX_DETAIL example that follows should read:
  684.  
  685.  
  686.           TX_DETAIL,4.,4.,16.,16.,0,
  687.  
  688.      On Infinite Reality and Impact TTTTXXXXTTTTIIIILLLLEEEE , TTTTXXXXSSSSEEEELLLLEEEE , TTTTXXXXDDDDEEEETTTTAAAA, and TTTTXXXXSSSSHHHHAAAARRRR are
  689.      not supported.  They do not support TTTTXXXXMMMMAAAAFFFFCCCCPPPP oooorrrr TTTTXXXXMMMMAAAAFFFFAAAAPPPP TTTThhhheeeeyyyy ddddoooo nnnnooootttt
  690.      ssssuuuuppppppppoooorrrrtttt TTTTXXXXFFFFSSSSDDDDFFFF wwwwiiiitttthhhh TTTTXXXXPPPPXXXXMMMMDDDD TTTTXXXXBBBBIIIILLLLLLLL,,,, TTTTXXXXBBBBIIIILLLLGGGG aaaannnndddd tttthhhheeeeyyyy ddddoooo nnnnooootttt ssssuuuuppppppppoooorrrrtttt TTTTXXXXBBBBIIIICCCCUUUU
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.